package com.clouddot.baipai.model;


import android.content.Context;

import com.clouddot.baipai.contract.IClassFragmentContract;
import com.clouddot.baipai.http.BanPaiRetrofitHelper;
import com.clouddot.baipai.http.entity.response.getClassHonorResponse;
import com.clouddot.baipai.http.entity.response.getClassInfoByIdResponse;
import com.clouddot.baipai.http.entity.response.getClassInfoListResponse;
import com.clouddot.baipai.http.entity.response.getClassMemberResponse;
import com.clouddot.baipai.infrastructure.environment.Env;

import org.wxy.sdk.base.impl.BaseModelImpl;

import rx.Observable;

public class ClassFragmentModel extends BaseModelImpl implements IClassFragmentContract.IModel {
    public ClassFragmentModel(Context context) {
        super(context);

    }

    @Override
    public Observable<getClassInfoListResponse> getClassInfoList(String acttype, String TaskType, String ClassId, int pageindex, int pagesize) {
        return BanPaiRetrofitHelper.getInstance(Env.getContent()).getServer().getClassInfo(Env.getAppContext().IP,acttype,TaskType,ClassId,pageindex,pagesize);
    }

    @Override
    public Observable<getClassInfoByIdResponse> getClassInfoById(String acttype, String id) {
        return BanPaiRetrofitHelper.getInstance(Env.getContent()).getServer().getClassInfoById(Env.getAppContext().IP,acttype,id);
    }

    @Override
    public Observable<getClassHonorResponse> getClassHonorList(String acttype, String ClassId, int pageindex, int pagesize) {
        return BanPaiRetrofitHelper.getInstance(Env.getContent()).getServer().getClassHonorList(Env.getAppContext().IP,acttype,ClassId,pageindex,pagesize);
    }

    @Override
    public Observable<getClassMemberResponse> getClassMemberList(String acttype, String ClassId, int pageindex, int pagesize) {
        return BanPaiRetrofitHelper.getInstance(Env.getContent()).getServer().getClassMemberList(Env.getAppContext().IP,acttype,ClassId,pageindex,pagesize);
    }


}
